// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.entity;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fowo.api.common.annotaion.*;
import com.fowo.api.common.mybatis.handlers.SysFileListTypeHandler;
import com.fowo.api.sys.entity.*;
import com.fowo.api.sys.entity.SysFile;
import com.fowo.api.sys.rd2.annotation.RoleData2;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.List;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

/**
 * Receipt
 */
@DS("ds24")
@Getter
@Setter
@TableName(value = "receipt", autoResultMap = true)
@Schema(title = "收货单")
@RoleData2(groupId = 10, funcKey = "Receipt")
public class Receipt implements Serializable {

  /**
   * 编号
   */
  @TableField(value = "`id`")
  @TableId(type = IdType.ASSIGN_ID)
  @Schema(title = "编号")
  private Long id;

  /**
   * 收货单号
   */
  @TableField(value = "`order_sn`")
  @Schema(title = "收货单号")
  private String orderSn;

  /**
   * 收货类型 (1 -  采购订单; 2 -  委外订单; )
   */
  @TableField(value = "`receipt_type`")
  @Schema(title = "收货类型")
  private String receiptType;

  /**
   * 关联单据号
   */
  @TableField(value = "`doc_relate`")
  @JoinField(PurchaseOrder.class)
  @Schema(title = "关联单据号")
  private Long docRelate;

  /**
   * 删除标记
   */
  @TableField(value = "`del_flag`")
  @TableLogic
  @Schema(title = "删除标记")
  private Boolean delFlag;

  /**
   * 仓库
   */
  @TableField(value = "`warehouse`")
  @JoinField(Warehouse.class)
  @Schema(title = "仓库")
  private Long warehouse;

  /**
   * 供应商
   */
  @TableField(value = "`supplier`")
  @JoinField(Supplier.class)
  @Schema(title = "供应商")
  private Long supplier;

  /**
   * 预计到货时间
   */
  @TableField(value = "`arrival_good_date`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "预计到货时间")
  private java.util.Date arrivalGoodDate;

  /**
   * 物流商
   */
  @TableField(value = "`shipment_enterprise`")
  @JoinField(LogisticsProvider.class)
  @Schema(title = "物流商")
  private Long shipmentEnterprise;

  /**
   * 物流单号
   */
  @TableField(value = "`logistics_code`")
  @Schema(title = "物流单号")
  private String logisticsCode;

  /**
   * 采购员
   */
  @TableField(value = "`buyer`")
  @JoinField(SysUser.class)
  @Schema(title = "采购员")
  private Long buyer;

  /**
   * 自定义创建人
   */
  @TableField(value = "`creator`")
  @JoinField(SysUser.class)
  @Schema(title = "自定义创建人")
  private Long creator;

  /**
   * 创建人
   */
  @TableField(value = "`create_user`")
  @JoinField(SysUser.class)
  @Schema(title = "创建人")
  private Long createUser;

  /**
   * 创建时间
   */
  @TableField(value = "`create_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "创建时间")
  private java.util.Date createTime;

  /**
   * 更新人
   */
  @TableField(value = "`last_update_user`")
  @Schema(title = "更新人")
  private Long lastUpdateUser;

  /**
   * 更新时间
   */
  @TableField(value = "`last_update_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "更新时间")
  private java.util.Date lastUpdateTime;

  /**
   * 收货人
   */
  @TableField(value = "`consignee`")
  @JoinField(SysUser.class)
  @Schema(title = "收货人")
  private Long consignee;

  /**
   * 收货时间
   */
  @TableField(value = "`receipt_date`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "收货时间")
  private java.util.Date receiptDate;

  /**
   * 备注
   */
  @TableField(value = "`remarks`")
  @Schema(title = "备注")
  private String remarks;

  /**
   * 收货仓库
   */
  @TableField(value = "`clerk`")
  @JoinField(Warehouse.class)
  @Schema(title = "收货仓库")
  private Long clerk;

  /**
   * 单据状态 (0 - 待收货; 1 - 已完成; )
   */
  @TableField(value = "`status`")
  @Schema(title = "单据状态")
  private String status;

  /**
   * 来源单据
   */
  @TableField(value = "`business_order_sn`")
  @Schema(title = "来源单据")
  private String businessOrderSn;

  /**
   * 费用分配方式 (0 - 不分摊; 1 - 按金额; 2 - 按数量; )
   */
  @TableField(value = "`cost_distribution`")
  @Schema(title = "费用分配方式")
  private String costDistribution;

  /**
   * 运费
   */
  @TableField(value = "`freight`")
  @Schema(title = "运费")
  private java.math.BigDecimal freight;

  /**
   * 其他费用
   */
  @TableField(value = "`other_expenses`")
  @Schema(title = "其他费用")
  private java.math.BigDecimal otherExpenses;

  /**
   * 附件
   */
  @TableField(value = "`appendix`", typeHandler = SysFileListTypeHandler.class)
  @Schema(title = "附件")
  private List<SysFile> appendix;

  /**
   * 总入库量
   */
  @TableField(value = "`all_total_storage`")
  @Schema(title = "总入库量")
  private Integer allTotalStorage;

  /**
   * 源表检测字段
   */
  @TableField(value = "`detection_flag`")
  @Schema(title = "源表检测字段")
  private String detectionFlag;

  /**
   * 加急
   */
  @TableField(value = "`urgent`")
  @Schema(title = "加急")
  private String urgent;

  /**
   * 通知收货量
   */
  @TableField(value = "`notification_of_receipt_quantity`")
  @Schema(title = "通知收货量")
  private Integer notificationOfReceiptQuantity;

  /**
   * 收货量
   */
  @TableField(value = "`receipt_about_quantity`")
  @Schema(title = "收货量")
  private Integer receiptAboutQuantity;

  /**
   * 收货产品
   */
  @TableField(
    value = "`receipt_about_product`",
    typeHandler = SysFileListTypeHandler.class
  )
  @Schema(title = "收货产品")
  private List<SysFile> receiptAboutProduct;
}
